import request from '@/utils/request'
const api_name='/video'
export default{
    //添加课时
    addVideo(video){
        return request({
            url: `http://39.98.120.230:8080/api/video`,
            method: 'post',
            data:video
          })

    },
    getVideoById(id){
        return request({
            url: `http://39.98.120.230:8080/api/video/${id}`,
            method: 'get',
           
          })
    }, 
    updateVideo(video){
        return request({
            url: `http://39.98.120.230:8080/api/video/${video.id}`,
            method: 'put',
            data:video
           
          })
    },
    deleteById(id){
        return request({
            url: `http://39.98.120.230:8080/api/video/${id}`,
            method: 'delete',
         
          })
    }

}